
using Qdb.Internal.Btree;
using Qdb.Internal.Btree.Algebra;

namespace Qdb.Internal.Btree.Algebra
{
	/// <exclude></exclude>
	public class BTreeRangeSingleIntersect : BTreeRangeSingleOperation
	{
		public BTreeRangeSingleIntersect(BTreeRangeSingle single) : base(single)
		{
		}

		protected override IBTreeRange Execute(BTreeRangeSingle single)
		{
			return BTreeAlgebra.Intersect(_single, single);
		}

		protected override IBTreeRange Execute(BTreeRangeUnion union)
		{
			return BTreeAlgebra.Intersect(union, _single);
		}
	}
}
